using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._TopographicProductionTools._Workflow._Tasks
{
    /// <summary>
    /// <para>Insert Task Group</para>
    /// <para>Adds tasks from the chosen task group to a job when required by workflow execution.</para>
    /// <para>在工作流执行需要时将所选任务组中的任务添加到作业中。</para>
    /// </summary>    
    [DisplayName("Insert Task Group")]
    public class InsertTaskGroup : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public InsertTaskGroup()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_job_id">
        /// <para>Job ID</para>
        /// <para>The ID of the Workflow Manager (Classic) job that will be updated. This is the ID for the parent task group job, not the task job.</para>
        /// <para>将更新的 Workflow Manager （Classic） 作业的 ID。这是父任务组作业的 ID，而不是任务作业的 ID。</para>
        /// </param>
        /// <param name="_task_group_id">
        /// <para>Task Group ID</para>
        /// <para>The ID of the task group that defines the tasks that will be inserted into the selected job’s task list.</para>
        /// <para>任务组的 ID，用于定义将插入到所选作业的任务列表中的任务。</para>
        /// </param>
        public InsertTaskGroup(long? _job_id, long? _task_group_id)
        {
            this._job_id = _job_id;
            this._task_group_id = _task_group_id;
        }
        public override string ToolboxName => "Topographic Production Tools";

        public override string ToolName => "Insert Task Group";

        public override string CallName => "topographic.InsertTaskGroup";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_job_id, _task_group_id, _database_path, _update_job_id];

        /// <summary>
        /// <para>Job ID</para>
        /// <para>The ID of the Workflow Manager (Classic) job that will be updated. This is the ID for the parent task group job, not the task job.</para>
        /// <para>将更新的 Workflow Manager （Classic） 作业的 ID。这是父任务组作业的 ID，而不是任务作业的 ID。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Job ID")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long? _job_id { get; set; }


        /// <summary>
        /// <para>Task Group ID</para>
        /// <para>The ID of the task group that defines the tasks that will be inserted into the selected job’s task list.</para>
        /// <para>任务组的 ID，用于定义将插入到所选作业的任务列表中的任务。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Task Group ID")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long? _task_group_id { get; set; }


        /// <summary>
        /// <para>Input Database Path</para>
        /// <para>The Workflow Manager (Classic) database connection file (.jtc) that contains the job information. If no connection file is specified, the current default Workflow Manager (Classic) database will be used.</para>
        /// <para>包含作业信息的 Workflow Manager （Classic） 数据库连接文件 （.jtc）。如果未指定连接文件，则将使用当前默认的 Workflow Manager （Classic） 数据库。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Database Path")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _database_path { get; set; } = null;


        /// <summary>
        /// <para>Update Job ID</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Update Job ID")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public long _update_job_id { get; set; }


        public InsertTaskGroup SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}